var http = require("http");
var querystring = require("querystring");

http.createServer(function(req, res) {
	//基本的处理post请求的套路
	if(req.url == "/dopost" && req.method.toLowerCase() == "post"){
		var allData = "";
		req.addListener('data', function(chunk) {
			allData += chunk;
		});
		req.addListener('end', function(){
			console.log(allData);//name=kkii$pwd=rrr
			var data = querystring.parse(allData);
			console.log(data);
			res.end("success");
		});
	}
}).listen(80,"127.0.0.1");
console.log('监听80端口');
